package com.frame.controller;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.frame.domain.SrcProcess;
import com.frame.service.SrcProcessService;
import org.springframework.beans.factory.annotation.Autowired;

public class CellDataDemoHeadDataListenerProcess implements ReadListener<SrcProcess> {

    private SrcProcessService srcProcessService;

    public CellDataDemoHeadDataListenerProcess(SrcProcessService srcProcessService) {
        this.srcProcessService = srcProcessService;
    }


    @Override
    public void invoke(SrcProcess srcProcess, AnalysisContext analysisContext) {
        srcProcessService.insertUsers(srcProcess);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {
        System.out.println("解析之后的方法");
    }
}